package com.masterrabbit.sn.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName repair_records
 */
@TableName(value ="repair_records")
@Data
public class RepairRecords {
    /**
     * ID（自增）
     */
    @TableId(type = IdType.AUTO)
    private Integer repairId;

    /**
     * 维修单号（UUID）
     */
    private String repairNumber;

    /**
     * 订单单号（外键）
     */
    private String orderNumber;

    /**
     * userID
     */
    private Integer userId;

    /**
     * 车辆ID
     */
    private Integer vehicleId;

    /**
     * 维修方式（字典）
     */
    private Integer repairMethod;

    /**
     * 取车位置
     */
    private String pickupLocation;

    /**
     * 预约日期
     */
    private Date appointmentDate;

    /**
     * 提交日期
     */
    private Date submissionDate;

    /**
     * 照片表ID（关联图片表ID）
     */
    private Integer imageId;

    /**
     * status
     */
    private Integer status;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        RepairRecords other = (RepairRecords) that;
        return (this.getRepairId() == null ? other.getRepairId() == null : this.getRepairId().equals(other.getRepairId()))
            && (this.getRepairNumber() == null ? other.getRepairNumber() == null : this.getRepairNumber().equals(other.getRepairNumber()))
            && (this.getOrderNumber() == null ? other.getOrderNumber() == null : this.getOrderNumber().equals(other.getOrderNumber()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getVehicleId() == null ? other.getVehicleId() == null : this.getVehicleId().equals(other.getVehicleId()))
            && (this.getRepairMethod() == null ? other.getRepairMethod() == null : this.getRepairMethod().equals(other.getRepairMethod()))
            && (this.getPickupLocation() == null ? other.getPickupLocation() == null : this.getPickupLocation().equals(other.getPickupLocation()))
            && (this.getAppointmentDate() == null ? other.getAppointmentDate() == null : this.getAppointmentDate().equals(other.getAppointmentDate()))
            && (this.getSubmissionDate() == null ? other.getSubmissionDate() == null : this.getSubmissionDate().equals(other.getSubmissionDate()))
            && (this.getImageId() == null ? other.getImageId() == null : this.getImageId().equals(other.getImageId()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRepairId() == null) ? 0 : getRepairId().hashCode());
        result = prime * result + ((getRepairNumber() == null) ? 0 : getRepairNumber().hashCode());
        result = prime * result + ((getOrderNumber() == null) ? 0 : getOrderNumber().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getVehicleId() == null) ? 0 : getVehicleId().hashCode());
        result = prime * result + ((getRepairMethod() == null) ? 0 : getRepairMethod().hashCode());
        result = prime * result + ((getPickupLocation() == null) ? 0 : getPickupLocation().hashCode());
        result = prime * result + ((getAppointmentDate() == null) ? 0 : getAppointmentDate().hashCode());
        result = prime * result + ((getSubmissionDate() == null) ? 0 : getSubmissionDate().hashCode());
        result = prime * result + ((getImageId() == null) ? 0 : getImageId().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", repairId=").append(repairId);
        sb.append(", repairNumber=").append(repairNumber);
        sb.append(", orderNumber=").append(orderNumber);
        sb.append(", userId=").append(userId);
        sb.append(", vehicleId=").append(vehicleId);
        sb.append(", repairMethod=").append(repairMethod);
        sb.append(", pickupLocation=").append(pickupLocation);
        sb.append(", appointmentDate=").append(appointmentDate);
        sb.append(", submissionDate=").append(submissionDate);
        sb.append(", imageId=").append(imageId);
        sb.append(", status=").append(status);
        sb.append("]");
        return sb.toString();
    }
}